diff options
author | click <none@none> | 2010-06-30 17:02:19 +0200 |
---|---|---|
committer | click <none@none> | 2010-06-30 17:02:19 +0200 |
commit | a9cae00503a6041835166416c1b7af39a0b59833 (patch) | |
tree | c084e9f2ee27f5fc267f36066bb1f67da97aadd2 | |
parent | f8bb7afa9817411beda1f2492d18c61679e9a5f9 (diff) |
Remove double-created genrev-target and move the CMAKE_BUILD_TYPE-declaration out of that section (not needed there)
--HG--
branch : trunk
-rw-r--r-- | CMakeLists.txt | 58 |
1 files changed, 19 insertions, 39 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ed74400e808..8e33c7815cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -102,49 +102,29 @@ set(GENREV_SRC # Handle debugmode compiles (this will require further work for proper WIN32-setups) if( DO_DEBUG ) set(CMAKE_BUILD_TYPE Debug) +endif() - add_executable(genrev - ${GENREV_SRC} - ) - - if( CMAKE_GENERATOR MATCHES "Visual Studio" ) - add_custom_target("revision.h" ALL - COMMAND "${CMAKE_CURRENT_BINARY_DIR}/$(ConfigurationName)/genrev" - ${CMAKE_SOURCE_DIR} - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" - DEPENDS genrev - ) - else() - add_custom_target("revision.h" ALL - COMMAND "${CMAKE_CURRENT_BINARY_DIR}/genrev" - ${CMAKE_SOURCE_DIR} - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" - DEPENDS genrev - ) - endif() +# +# Generate revision-extractor +# +add_executable(genrev + ${GENREV_SRC} +) +if( CMAKE_GENERATOR MATCHES "Visual Studio" ) + add_custom_target("revision.h" ALL + COMMAND "${CMAKE_BINARY_DIR}/$(ConfigurationName)/genrev" + ${CMAKE_SOURCE_DIR} + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" + DEPENDS genrev + ) else() - - add_executable(genrev - ${GENREV_SRC} + add_custom_target("revision.h" ALL + COMMAND "${CMAKE_BINARY_DIR}/genrev" + ${CMAKE_SOURCE_DIR} + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" + DEPENDS genrev ) - - if( CMAKE_GENERATOR MATCHES "Visual Studio" ) - add_custom_target("revision.h" ALL - COMMAND "${CMAKE_CURRENT_BINARY_DIR}/$(ConfigurationName)/genrev" - ${CMAKE_SOURCE_DIR} - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" - DEPENDS genrev - ) - else() - add_custom_target("revision.h" ALL - COMMAND "${CMAKE_CURRENT_BINARY_DIR}/genrev" - ${CMAKE_SOURCE_DIR} - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" - DEPENDS genrev - ) - endif() - endif() execute_process( |