diff options
author | David Cole <david.cole@kitware.com> | 2011-09-20 18:41:31 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2011-09-20 18:41:31 (GMT) |
commit | d57c23c329e259b7f6e1885d3f87d8f968058b9f (patch) | |
tree | 7e6256946868d5f9f77d100366aff8d7cdfacbc9 | |
parent | 400c74f3258f9ab481f1c549db91a93337ca098d (diff) | |
parent | c336778c528a82d66cd986c642c11156b5da1524 (diff) | |
download | CMake-d57c23c329e259b7f6e1885d3f87d8f968058b9f.zip CMake-d57c23c329e259b7f6e1885d3f87d8f968058b9f.tar.gz CMake-d57c23c329e259b7f6e1885d3f87d8f968058b9f.tar.bz2 |
Merge topic 'fix-build-testing-problem'
c336778 CMake: Reference test targets only when BUILD_TESTING is ON
-rw-r--r-- | CMakeLists.txt | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index cf948c2..788b386 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -231,11 +231,13 @@ MACRO (CMAKE_BUILD_UTILITIES) CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}_c "${kwsys_folder}") CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}EncodeExecutable "${kwsys_folder}") CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}ProcessFwd9x "${kwsys_folder}") - CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestDynload "${kwsys_folder}") - CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestProcess "${kwsys_folder}") - CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestsC "${kwsys_folder}") - CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestsCxx "${kwsys_folder}") - CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestSharedForward "${kwsys_folder}") + if(BUILD_TESTING) + CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestDynload "${kwsys_folder}") + CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestProcess "${kwsys_folder}") + CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestsC "${kwsys_folder}") + CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestsCxx "${kwsys_folder}") + CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestSharedForward "${kwsys_folder}") + endif() #--------------------------------------------------------------------- # Setup third-party libraries. @@ -598,7 +600,9 @@ ADD_SUBDIRECTORY(Source) ADD_SUBDIRECTORY(Utilities) ADD_SUBDIRECTORY(Tests) -CMAKE_SET_TARGET_FOLDER(CMakeLibTests "Tests") +if(BUILD_TESTING) + CMAKE_SET_TARGET_FOLDER(CMakeLibTests "Tests") +endif() CMAKE_SET_TARGET_FOLDER(cmw9xcom "Utilities/Win9xCompat") CMAKE_SET_TARGET_FOLDER(documentation "Documentation") |