View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0015018 | CMake | CMake | public | 2014-07-12 16:41 | 2016-06-10 14:31 | ||||
Reporter | Andrew Aladjev | ||||||||
Assigned To | Kitware Robot | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | x86_64 | OS | Gentoo | OS Version | 2.2 | ||||
Product Version | CMake 3.0 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0015018: Try_run with project and target | ||||||||
Description | "try_compile" has ability to work with complete project and it's target, "try_run" do not. Why? | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0036358) Brad King (manager) 2014-07-14 08:49 |
It was simply never implemented. We almost never use try_run in practice anymore because it does not work for cross-compiling. Besides, the whole-project signature of try_compile leaves the build tree around instead of using a temporary directory and then deleting it. That means the binary will be available to try running with execute_process. |
(0037191) Andrew Aladjev (reporter) 2014-11-12 06:00 |
Ok. This works good cmake_minimum_required (VERSION "2.8") project ("check" "C") set (CMAKE_TRY_RUN false CACHE BOOL "try run targets after build") add_executable ( "main" "${CMAKE_CURRENT_SOURCE_DIR}/main.c" ) if (${CMAKE_TRY_RUN}) add_custom_command( TARGET "main" POST_BUILD COMMAND "./main" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Running main" ) endif () |
(0042585) Kitware Robot (administrator) 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. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2014-07-12 16:41 | Andrew Aladjev | New Issue | |
2014-07-14 08:49 | Brad King | Note Added: 0036358 | |
2014-11-12 06:00 | Andrew Aladjev | Note Added: 0037191 | |
2016-06-10 14:29 | Kitware Robot | Note Added: 0042585 | |
2016-06-10 14:29 | Kitware Robot | Status | new => resolved |
2016-06-10 14:29 | Kitware Robot | Resolution | open => moved |
2016-06-10 14:29 | Kitware Robot | Assigned To | => Kitware Robot |
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |