[CMake] nasm and TRY_COMPILE problem

Prakash Punnoor prakash at punnoor.de
Sun Feb 19 17:30:33 EST 2006


Hi,

I am using these files to get nasm support:
http://www.cmake.org/pipermail/cmake/2005-November/007478.html

This works for compilation, but recently I wanted to make a test using 
TRY_COMPILE like this:

      # check nasm visibility support
      SET(SOURCE "global _foo:function hidden")
      FILE(WRITE "${CMAKE_BINARY_DIR}/CMakeTmp/src.nasm" "${SOURCE}")

      TRY_COMPILE(NASM_HAS_VISIBILITY
                  ${CMAKE_BINARY_DIR}
                  ${CMAKE_BINARY_DIR}/CMakeTmp/src.nasm
                  CMAKE_FLAGS
                  OUTPUT_VARIABLE OUTPUT)

But I get:

CMake Error: CMAKE_ASM_COMPILER not set, after EnableLanguage
CMake Error: Internal CMake error, TryCompile configure of cmake failed

What have I forgotton? I notice that despite the line

CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/admin/CMakeModules/CMakeASMCompiler.cmake.in 
               ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeASMCompiler.cmake IMMEDIATE 
@ONLY)

in CMakeDetermineASMCompiler.cmake the file doesn't get created (at least I 
don't find it). But if I leave out that line, CMake errors. I don't know 
whether this is related to above problem.


I am using cmake version 2.2-patch 3.

Cheers,
-- 
(°=                 =°)
//\ Prakash Punnoor /\\
V_/                 \_V


More information about the CMake mailing list