paradiseo/cmake/Target.cmake
Adèle Harrissart eac4584eb7 Contradiction between ./cmake/Target.cmake (make doc command) and ./CMakeLists.txt (if condition).
Error when executing "make doc" command with DEO_ONLY=true flag :

Built target doc-eo
make[4]: *** No rule to make target `doc-edo'.  Stop.
make[3]: *** [CMakeFiles/doc] Error 2
make[2]: *** [CMakeFiles/doc.dir/all] Error 2
make[1]: *** [CMakeFiles/doc.dir/rule] Error 2
make: *** [doc] Error 2

Now resolved.
2014-06-13 11:53:04 +02:00

66 lines
2.5 KiB
CMake

######################################################################################
### cleanall will delete all files and folders in build directory
######################################################################################
if(UNIX)
add_custom_target(cleanall COMMAND cd ${CMAKE_BINARY_DIR} && rm -rf *)
endif(UNIX)
######################################################################################
### Doc-all enable to build all documentations in one target
######################################################################################
if(DOXYGEN_FOUND AND DOXYGEN_EXECUTABLE)
if(NOT EO_ONLY)
if(SMP)
add_custom_target(doc
COMMAND make doc-eo
COMMAND make doc-edo
COMMAND make doc-mo
COMMAND make doc-moeo
COMMAND make doc-smp
)
else()
add_custom_target(doc
COMMAND make doc-eo
COMMAND make doc-edo
COMMAND make doc-mo
COMMAND make doc-moeo
)
endif(SMP)
else()
add_custom_target(doc
COMMAND make doc-eo
)
endif(NOT EO_ONLY)
endif(DOXYGEN_FOUND AND DOXYGEN_EXECUTABLE)
######################################################################################
### Perform covering test if lcov is found
######################################################################################
if(PROFILING)
find_program(LCOV
NAMES lcov
PATHS
"/usr/local/bin /usr/bin [HKEY_LOCAL_MACHINE\\SOFTWARE\\Rational Software\\Purify\\Setup;InstallFolder] [HKEY_CURRENT_USER\\Software]"
DOC "Path to the memory checking command, used for memory error detection.")
if(LCOV)
add_custom_target(coverage
COMMAND make
COMMAND ctest
COMMAND lcov -d . -c -o output.info
COMMAND lcov -r output.info '*/tutorial*' -o output.info
COMMAND lcov -r output.info '/usr*' -o output.info
COMMAND lcov -r output.info '*/test*' -o output.info
COMMAND lcov -r output.info '*/eo*' -o output.info
COMMAND lcov -r output.info '*/mo*' -o output.info
COMMAND lcov -r output.info '*/moeo*' -o output.info
COMMAND lcov -r output.info '*/problems*' -o output.info
COMMAND genhtml output.info -o coverage/ --highlight --legend
)
else(LCOV)
message(STATUS "Could NOT find Lcov")
endif(LCOV)
endif(PROFILING)