MantisBT - CMake
View Issue Details
0015695CMakeCMakepublic2015-08-13 11:482016-06-10 14:31
bugreporter 
Kitware Robot 
normalminoralways
closedmoved 
 
 
0015695: CMAKE_*_OUTPUT_DIRECTORY existence is not evaluated by cmake_check_build_system target
If you are specifying certain CMAKE_*_OUTPUT_DIRECTORY variables they are properly created when CMake generation is done, but in case you are removing the specified directories after a successful run they are not recreated until you re-run CMake.
It would be good to track this paths for evaluation within the cmake_check_build_system target, so that the re-run of CMake is automatically done in case the folders are not existing.
project(Example)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/libstatic)

add_executable(TestExecutable test1.cpp)
add_library(TestLibrary SHARED test2.cpp)
add_library(TestLibrary2 STATIC test3.cpp)
No tags attached.
gz cmakeexamplebugreport.tar.gz (434) 2015-08-14 06:15
https://public.kitware.com/Bug/file/5509/cmakeexamplebugreport.tar.gz
Issue History
2015-08-13 11:48bugreporterNew Issue
2015-08-14 06:15bugreporterFile Added: cmakeexamplebugreport.tar.gz
2015-08-14 06:17bugreporterNote Added: 0039282
2015-08-17 10:06bugreporterNote Edited: 0039282bug_revision_view_page.php?bugnote_id=39282#r1869
2015-08-27 07:24bugreporterNote Added: 0039334
2015-08-27 08:54Brad KingView Statusprivate => public
2015-08-27 11:49bugreporterNote Deleted: 0039334
2016-06-10 14:29Kitware RobotNote Added: 0042822
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0039282)
bugreporter   
2015-08-14 06:17   
(edited on: 2015-08-17 10:06)
Attached example project which can be used to reproduce it by doing following steps:
$ cmake .
$ make
$ rm -r lib
$ make

Any more information required from my side? Any acknowledgement of this bug?

(0042822)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.