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                                    
======================================================================

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to