diff options
author | Brad King <brad.king@kitware.com> | 2013-11-20 14:08:25 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-11-20 14:08:25 (GMT) |
commit | 483b7e709396122c2e235972902a65e34878ae2a (patch) | |
tree | 2f84af3046600831d57990145a0f4361878844ae | |
parent | b20f4d4deed23886d8afdc696515ac75e8dedd50 (diff) | |
parent | a247911a88058ec2f814df5c1620b0be5a1065a8 (diff) | |
download | CMake-483b7e709396122c2e235972902a65e34878ae2a.zip CMake-483b7e709396122c2e235972902a65e34878ae2a.tar.gz CMake-483b7e709396122c2e235972902a65e34878ae2a.tar.bz2 |
Merge topic 'remove-LOCATION-property-use'
a247911 Tests: Don't read the LOCATION property from build targets.
cffcdd8 KDevelop: Use GetLocation(0) instead of LOCATION property.
-rw-r--r-- | Source/cmGlobalKdevelopGenerator.cxx | 2 | ||||
-rw-r--r-- | Tests/BundleUtilities/CMakeLists.txt | 18 | ||||
-rw-r--r-- | Tests/CustomCommand/CMakeLists.txt | 5 | ||||
-rw-r--r-- | Tests/LinkDirectory/CMakeLists.txt | 6 | ||||
-rw-r--r-- | Tests/MakeClean/ToClean/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Tests/Tutorial/Step6/MathFunctions/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/Tutorial/Step7/MathFunctions/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/Wrapping/CMakeLists.txt | 3 |
8 files changed, 14 insertions, 29 deletions
diff --git a/Source/cmGlobalKdevelopGenerator.cxx b/Source/cmGlobalKdevelopGenerator.cxx index 273d4bb..ab7db51 100644 --- a/Source/cmGlobalKdevelopGenerator.cxx +++ b/Source/cmGlobalKdevelopGenerator.cxx @@ -75,7 +75,7 @@ void cmGlobalKdevelopGenerator::Generate() { if (ti->second.GetType()==cmTarget::EXECUTABLE) { - executable = ti->second.GetProperty("LOCATION"); + executable = ti->second.GetLocation(0); break; } } diff --git a/Tests/BundleUtilities/CMakeLists.txt b/Tests/BundleUtilities/CMakeLists.txt index 5cc7071..3a1cf55 100644 --- a/Tests/BundleUtilities/CMakeLists.txt +++ b/Tests/BundleUtilities/CMakeLists.txt @@ -25,13 +25,11 @@ set_target_properties(shared shared2 framework PROPERTIES # testbundleutils1 will load this at runtime add_library(module1 MODULE module.cpp module.h) set_target_properties(module1 PROPERTIES PREFIX "") -get_target_property(module_loc module1 LOCATION) target_link_libraries(module1 shared2) # a bundle application add_executable(testbundleutils1 MACOSX_BUNDLE testbundleutils1.cpp) target_link_libraries(testbundleutils1 shared framework ${CMAKE_DL_LIBS}) -get_target_property(loc testbundleutils1 LOCATION) set_target_properties(testbundleutils1 module1 PROPERTIES INSTALL_RPATH "${CMAKE_CURRENT_BINARY_DIR}/testdir1" @@ -40,8 +38,8 @@ set_target_properties(testbundleutils1 module1 PROPERTIES # add custom target to install and test the app add_custom_target(testbundleutils1_test ALL COMMAND ${CMAKE_COMMAND} - "-DINPUT=${loc}" - "-DMODULE=${module_loc}" + "-DINPUT=$<TARGET_FILE:testbundleutils1>" + "-DMODULE=$<TARGET_FILE:module1>" "-DINPUTDIR=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}" "-DOUTPUTDIR=${CMAKE_CURRENT_BINARY_DIR}/testdir1" -P "${CMAKE_CURRENT_SOURCE_DIR}/bundleutils.cmake" @@ -58,13 +56,11 @@ add_dependencies(testbundleutils1_test testbundleutils1) # testbundleutils2 will load this at runtime add_library(module2 MODULE module.cpp module.h) set_target_properties(module2 PROPERTIES PREFIX "") -get_target_property(module_loc module2 LOCATION) target_link_libraries(module2 shared2) # a non-bundle application add_executable(testbundleutils2 testbundleutils2.cpp) target_link_libraries(testbundleutils2 shared framework ${CMAKE_DL_LIBS}) -get_target_property(loc testbundleutils2 LOCATION) set_target_properties(testbundleutils2 module2 PROPERTIES INSTALL_RPATH "${CMAKE_CURRENT_BINARY_DIR}/testdir2" @@ -73,8 +69,8 @@ set_target_properties(testbundleutils2 module2 PROPERTIES # add custom target to install and test the app add_custom_target(testbundleutils2_test ALL COMMAND ${CMAKE_COMMAND} - "-DINPUT=${loc}" - "-DMODULE=${module_loc}" + "-DINPUT=$<TARGET_FILE:testbundleutils2>" + "-DMODULE=$<TARGET_FILE:module2>" "-DINPUTDIR=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}" "-DOUTPUTDIR=${CMAKE_CURRENT_BINARY_DIR}/testdir2" -P "${CMAKE_CURRENT_SOURCE_DIR}/bundleutils.cmake" @@ -106,13 +102,11 @@ if(APPLE AND NOT CMAKE_SYSTEM_VERSION VERSION_LESS 9.0) # testbundleutils1 will load this at runtime add_library(module3 MODULE module.cpp module.h) set_target_properties(module3 PROPERTIES PREFIX "" LINK_FLAGS "-Wl,-rpath,@loader_path/") - get_target_property(module_loc module3 LOCATION) target_link_libraries(module3 shared2-3) # a non-bundle application add_executable(testbundleutils3 testbundleutils3.cpp) target_link_libraries(testbundleutils3 shared-3 framework-3 ${CMAKE_DL_LIBS}) - get_target_property(loc testbundleutils3 LOCATION) set_target_properties(testbundleutils3 module3 PROPERTIES LINK_FLAGS "-Wl,-rpath,@loader_path/") @@ -120,8 +114,8 @@ if(APPLE AND NOT CMAKE_SYSTEM_VERSION VERSION_LESS 9.0) # add custom target to install and test the app add_custom_target(testbundleutils3_test ALL COMMAND ${CMAKE_COMMAND} - "-DINPUT=${loc}" - "-DMODULE=${module_loc}" + "-DINPUT=$<TARGET_FILE:testbundleutils3>" + "-DMODULE=$<TARGET_FILE:module3>" "-DINPUTDIR=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}" "-DOUTPUTDIR=${CMAKE_CURRENT_BINARY_DIR}/testdir3" -P "${CMAKE_CURRENT_SOURCE_DIR}/bundleutils.cmake" diff --git a/Tests/CustomCommand/CMakeLists.txt b/Tests/CustomCommand/CMakeLists.txt index 2408141..bbae387 100644 --- a/Tests/CustomCommand/CMakeLists.txt +++ b/Tests/CustomCommand/CMakeLists.txt @@ -29,9 +29,6 @@ set (EXECUTABLE_OUTPUT_PATH # add the executable that will generate the file add_executable(generator generator.cxx) -get_target_property(generator_PATH generator LOCATION) -message("Location ${generator_PATH}") - ################################################################ # # Test using a wrapper to wrap a header file @@ -189,7 +186,7 @@ add_executable(CustomCommand # generated source in a target. add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/generated.c DEPENDS generator - COMMAND ${generator_PATH} + COMMAND generator ARGS ${PROJECT_BINARY_DIR}/generated.c ) diff --git a/Tests/LinkDirectory/CMakeLists.txt b/Tests/LinkDirectory/CMakeLists.txt index 7356b27..b8d5a04 100644 --- a/Tests/LinkDirectory/CMakeLists.txt +++ b/Tests/LinkDirectory/CMakeLists.txt @@ -11,13 +11,13 @@ endif() add_library(mylibA STATIC mylibA.c) set_property(TARGET mylibA PROPERTY ARCHIVE_OUTPUT_DIRECTORY "${LinkDirectory_BINARY_DIR}/External/lib") -get_property(mylibA TARGET mylibA PROPERTY LOCATION) +# get_property(mylibA TARGET mylibA PROPERTY LOCATION) # Build a library into our build tree relative to the subproject build tree. add_library(mylibB STATIC mylibB.c) set_property(TARGET mylibB PROPERTY ARCHIVE_OUTPUT_DIRECTORY "${LinkDirectory_BINARY_DIR}/lib") -get_property(mylibB TARGET mylibB PROPERTY LOCATION) +# get_property(mylibB TARGET mylibB PROPERTY LOCATION) # Create a custom target to drive the subproject build. include(ExternalProject) @@ -38,7 +38,7 @@ ExternalProject_Add_Step(ExternalTarget cleanup COMMAND ${CMAKE_COMMAND} -E remove_directory ${LinkDirectory_BINARY_DIR}/bin DEPENDEES download DEPENDERS configure - DEPENDS ${mylibA} ${mylibB} + DEPENDS mylibA mylibB "${LinkDirectory_BINARY_DIR}/External/CMakeLists.txt" "${LinkDirectory_BINARY_DIR}/External/myexe.c" ) diff --git a/Tests/MakeClean/ToClean/CMakeLists.txt b/Tests/MakeClean/ToClean/CMakeLists.txt index 089fd13..d0e24ce 100644 --- a/Tests/MakeClean/ToClean/CMakeLists.txt +++ b/Tests/MakeClean/ToClean/CMakeLists.txt @@ -5,7 +5,6 @@ project(ToClean) add_executable(toclean toclean.cxx) # List some build-time-generated files. -get_target_property(TOCLEAN_FILES toclean LOCATION) set(TOCLEAN_FILES ${TOCLEAN_FILES} "${ToClean_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/toclean.dir/toclean.cxx${CMAKE_CXX_OUTPUT_EXTENSION}") diff --git a/Tests/Tutorial/Step6/MathFunctions/CMakeLists.txt b/Tests/Tutorial/Step6/MathFunctions/CMakeLists.txt index 9961e69..70a35f6 100644 --- a/Tests/Tutorial/Step6/MathFunctions/CMakeLists.txt +++ b/Tests/Tutorial/Step6/MathFunctions/CMakeLists.txt @@ -1,13 +1,11 @@ # first we add the executable that generates the table add_executable(MakeTable MakeTable.cxx) -get_target_property(MakeTableLocation MakeTable LOCATION) - # add the command to generate the source code add_custom_command ( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Table.h DEPENDS MakeTable - COMMAND ${MakeTableLocation} + COMMAND MakeTable ARGS ${CMAKE_CURRENT_BINARY_DIR}/Table.h ) diff --git a/Tests/Tutorial/Step7/MathFunctions/CMakeLists.txt b/Tests/Tutorial/Step7/MathFunctions/CMakeLists.txt index 9961e69..70a35f6 100644 --- a/Tests/Tutorial/Step7/MathFunctions/CMakeLists.txt +++ b/Tests/Tutorial/Step7/MathFunctions/CMakeLists.txt @@ -1,13 +1,11 @@ # first we add the executable that generates the table add_executable(MakeTable MakeTable.cxx) -get_target_property(MakeTableLocation MakeTable LOCATION) - # add the command to generate the source code add_custom_command ( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Table.h DEPENDS MakeTable - COMMAND ${MakeTableLocation} + COMMAND MakeTable ARGS ${CMAKE_CURRENT_BINARY_DIR}/Table.h ) diff --git a/Tests/Wrapping/CMakeLists.txt b/Tests/Wrapping/CMakeLists.txt index 1dc7ffc..cbb28a1 100644 --- a/Tests/Wrapping/CMakeLists.txt +++ b/Tests/Wrapping/CMakeLists.txt @@ -89,9 +89,8 @@ set (FLTK_SRCS fltk1.fl ) add_executable(fakefluid fakefluid.cxx) -get_target_property(FLUID_LOC fakefluid LOCATION) set (FLTK_WRAP_UI "On") -set (FLTK_FLUID_EXECUTABLE "${FLUID_LOC}") +set (FLTK_FLUID_EXECUTABLE fakefluid) fltk_wrap_ui (wraplibFLTK ${FLTK_SRCS}) add_library(wraplibFLTK ${wraplibFLTK_FLTK_UI_SRCS}) add_dependencies(wraplibFLTK fakefluid) |