[cmake-developers] [CMake 0015975]: GHS Multi Generator: COPY_FILE in try_compile does not work
Mantis Bug Tracker
mantis at public.kitware.com
Tue Feb 16 10:58:03 EST 2016
The following issue has been SUBMITTED.
======================================================================
https://cmake.org/Bug/view.php?id=15975
======================================================================
Reported By: stw_sesa
Assigned To:
======================================================================
Project: CMake
Issue ID: 15975
Category: CMake
Reproducibility: always
Severity: major
Priority: normal
Status: new
======================================================================
Date Submitted: 2016-02-16 10:58 EST
Last Modified: 2016-02-16 10:58 EST
======================================================================
Summary: GHS Multi Generator: COPY_FILE in try_compile does
not work
Description:
try_compile COPY_FILE: The GHS MULTI Compiler compiles+links the executable to
"targetname.as", but the CMake Generator currently looks for "targetname"
(without extension). As a folder with such a name exists in the build directory
COPY_FILE copies the folder instead of the built executable and the try_compile
execution does not fail.
Steps to Reproduce:
Create a simple CMakeLists.txt like this:
try_compile(
result
"${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp"
"${CMAKE_SOURCE_DIR}/test.c"
COPY_FILE "${CMAKE_BINARY_DIR}/test_executable"
)
message(STATUS "result of try_compile: " ${result})
Create a simple test program as "test.c":
int main(int argc, char *argv[])
{
return 0;
}
Run CMake using GHS MULTI Generator (ARM Integrity).
Actual result:
try_compile succeeds and a empty folder "test_executable" is created in the
build directory
Expected result:
try_compile succeeds and the built executable "test_executable" is located in
the build directory
Additional Information:
I've tried setting
set("CMAKE_EXECUTABLE_SUFFIX", ".as")
manually at various locations but it didn't work. Either it wasn't set at all or
overwritten; I don't know.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2016-02-16 10:58 stw_sesa New Issue
======================================================================
More information about the cmake-developers
mailing list