Cmake:动态链接器在加载可执行文件时如何定位动态库?

时间:2015-09-09 13:58:44

标签: compiler-construction linker cmake shared-libraries static-libraries

我试图了解如何使用CMake构建C ++项目。 我不熟悉C ++。 我正在使用mac Os X,我也喜欢在Linux上分享应用程序。

这是我的项目目录架构。您可以在github

上找到

This is my project directory architecture.

我已经用静态和共享库完成了一个程序,看看它是如何工作的。 我读到了shared and static librarieshere on stackoverflow和Cmake的内容1& 2

最初我正在合并可执行文件中的所有源代码。它运作良好。 但共享的目标不是打包,不是吗? 它应该是按位置访问。或者当我在安装版本下移动我的lib和bin时。该计划仍在运作。很好,但我怀疑它应该像这样工作。 我的意思是如果我移动我的共享库,该程序应该不再工作。

所以不要这样做,

  

#ADD_EXECUTABLE(ChimericGenomeMaker" $ {SOURCES_MAIN}"" $ {SOURCES_STATIC}"" $ {SOURCES_SHARED}")

我尝试使用TARGET_LINK_LIBRARIES并且可能(LINK_DIRECTORIES):

  

TARGET_LINK_LIBRARIES(ChimericGenomeMaker" calculMean")   TARGET_LINK_LIBRARIES(ChimericGenomeMaker" calculSum")

但它没有用。

 ./install/bin/ChimericGenomeMaker 4
 dyld: Library not loaded: libcalculMean.dylib
 Referenced from:  /Users/JP/Desktop/ChimericGenomeMaker/./install/bin/ChimericGenomeMaker
  Reason: image not found
   Trace/BPT trap: 5

使用otool -L,告诉我接下来的内容:

./install/bin/ChimericGenomeMaker:
    libcalculMean.dylib (compatibility version 0.0.0, current version 0.0.0)
    /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)

好吧,我的dylib的位置存在问题......我的第一个想法(无论如何合并所有可执行文件,它们来自哪个库)都是错误的想法? 什么是好的"框架" ?

最后一个问题,无论如何共享或静态库,如果我移动了我的lib目录,该程序是否会继续正常运行?

感谢。

这是我的CmakeLists.txt [已更新]

#cmake -G "Eclipse CDT4 - Unix Makefiles" ..
#SET (CMAKE_CXX_COMPILER "/usr/bin/g++")

IF (${APPLE})
  MESSAGE(STATUS "WELCOME TO APPLE")
ENDIF()

CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(ChimericGenomeMaker)

SET (ChimericGenomeMaker_VERSION_MAJOR 1)
SET (ChimericGenomeMaker_VERSION_MINOR 0)

#used by makefile users in order to install software at non-default location
#make DESTDIR=/home/john install --> prepended with the DESTDIR value
SET(CMAKE_INSTALL_PREFIX install)

#SET(CMAKE_SKIP_BUILD_RPATH true )
#Can manually add the sources using the set command as follows:
FILE(GLOB SOURCES_MAIN "src/main/*.cpp")
INCLUDE_DIRECTORIES("${PROJECT_SOURCE_DIR}/include/main")

#Generate the shared library from the sources
FILE(GLOB SOURCES_SHARED "src/shared/*.cpp")
INCLUDE_DIRECTORIES("${PROJECT_SOURCE_DIR}/include/shared")
ADD_LIBRARY(calculMean SHARED "${SOURCES_SHARED}")
INSTALL(TARGETS calculMean DESTINATION "lib/shared")
#MACOSX_RPATH is not specified for the following targets calcuMean

#Generate the static library from the sources
FILE(GLOB SOURCES_STATIC "src/static/*.cpp")
INCLUDE_DIRECTORIES("${PROJECT_SOURCE_DIR}/include/static")
ADD_LIBRARY(calculSum STATIC "${SOURCES_STATIC}")
INSTALL(TARGETS calculSum DESTINATION "lib/static")

# Use, i.e. don't skip the full RPATH for the build tree
# SET(CMAKE_SKIP_BUILD_RPATH  FALSE)

# When building, don't use the install RPATH already (but later on when installing)
#SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) 

#SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib/shared")

# add the automatically determined parts of the RPATH which point to directories outside the build tree to the install RPATH
#SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

# the RPATH to be used when installing, but only if it's not a system directory
#LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib/shared"  isSystemDir)
# IF("${isSystemDir}" STREQUAL "-1")
#    SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib/shared")
# ENDIF("${isSystemDir}" STREQUAL "-1")

#Build a stand alone program
ADD_EXECUTABLE(ChimericGenomeMaker "${SOURCES_SHARED}" "${SOURCES_MAIN}"  )# "${SOURCES_STATIC}" 
#TARGET_LINK_LIBRARIES(ChimericGenomeMaker calculMean) 
TARGET_LINK_LIBRARIES(ChimericGenomeMaker calculSum)

INSTALL(TARGETS ChimericGenomeMaker DESTINATION bin)

ADD_CUSTOM_COMMAND(TARGET calculMean
                   POST_BUILD
                   COMMAND "${CMAKE_SOURCE_DIR}/bash/post-build.sh" "HELLO YOU!"
                   WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
                   COMMENT "Post-build is Running" VERBATIM
)

CMAKE的输出:

    ./build.sh
-- Custom Bash Cleaning
-- Old Install Directory Deleted with sucess
-- WELCOME TO APPLE
-- The C compiler identification is AppleClang 6.1.0.6020053
-- The CXX compiler identification is AppleClang 6.1.0.6020053
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- INSTALL_NAME_DIR:         
-- CMAKE_BINARY_DIR:         /Users/JP/Desktop/ChimericGenomeMaker/build
-- CMAKE_CURRENT_BINARY_DIR: /Users/JP/Desktop/ChimericGenomeMaker/build
-- CMAKE_SOURCE_DIR:         /Users/JP/Desktop/ChimericGenomeMaker
-- CMAKE_CURRENT_SOURCE_DIR: /Users/JP/Desktop/ChimericGenomeMaker
-- PROJECT_BINARY_DIR: /Users/JP/Desktop/ChimericGenomeMaker/build
-- PROJECT_SOURCE_DIR: /Users/JP/Desktop/ChimericGenomeMaker
-- EXECUTABLE_OUTPUT_PATH: 
-- LIBRARY_OUTPUT_PATH:     
-- CMAKE_MODULE_PATH: 
-- CMAKE_COMMAND: /usr/local/Cellar/cmake/3.2.1/bin/cmake
-- CMAKE_ROOT: /usr/local/Cellar/cmake/3.2.1/share/cmake
-- CMAKE_CURRENT_LIST_FILE: /Users/JP/Desktop/ChimericGenomeMaker/CMakeLists.txt
-- CMAKE_CURRENT_LIST_LINE: 122
-- CMAKE_INCLUDE_PATH: 
-- CMAKE_LIBRARY_PATH: 
-- CMAKE_SYSTEM: Darwin-14.4.0
-- CMAKE_SYSTEM_NAME: Darwin
-- CMAKE_SYSTEM_VERSION: 14.4.0
-- CMAKE_SYSTEM_PROCESSOR: x86_64
-- UNIX: 1
-- WIN32: 
-- APPLE: 1
-- MINGW: 
-- CYGWIN: 
-- BORLAND: 
-- MSVC: 
-- MSVC_IDE: 
-- MSVC60: 
-- MSVC70: 
-- MSVC71: 
-- MSVC80: 
-- CMAKE_COMPILER_2005: 
-- CMAKE_SKIP_RULE_DEPENDENCY: 
-- CMAKE_SKIP_INSTALL_ALL_DEPENDENCY: 
-- CMAKE_SKIP_RPATH: NO
-- CMAKE_VERBOSE_MAKEFILE: FALSE
-- CMAKE_SUPPRESS_REGENERATION: 
-- CMAKE_C_FLAGS: 
-- CMAKE_CXX_FLAGS: 
-- CMAKE_BUILD_TYPE: 
-- BUILD_SHARED_LIBS: 
-- CMAKE_C_COMPILER: /Library/Developer/CommandLineTools/usr/bin/cc
-- CMAKE_CXX_COMPILER: /Library/Developer/CommandLineTools/usr/bin/c++
-- CMAKE_COMPILER_IS_GNUCC: 
-- CMAKE_COMPILER_IS_GNUCXX : 
-- CMAKE_AR: /Library/Developer/CommandLineTools/usr/bin/ar
-- CMAKE_RANLIB: /Library/Developer/CommandLineTools/usr/bin/ranlib
-- DESKTOP : 
-- PATH : /Users/JP/.jenv/shims:/usr/local/mysql/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
-- Configuring done
CMake Warning (dev):
  Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run "cmake
  --help-policy CMP0042" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  MACOSX_RPATH is not specified for the following targets:

   calculMean

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /Users/JP/Desktop/ChimericGenomeMaker/build
Scanning dependencies of target calculSum
[ 20%] Building CXX object CMakeFiles/calculSum.dir/src/static/calc_sum.cpp.o
Linking CXX static library libcalculSum.a
[ 20%] Built target calculSum
Scanning dependencies of target ChimericGenomeMaker
[ 40%] Building CXX object CMakeFiles/ChimericGenomeMaker.dir/src/shared/calc_mean.cpp.o
[ 60%] Building CXX object CMakeFiles/ChimericGenomeMaker.dir/src/main/foo.cpp.o
[ 80%] Building CXX object CMakeFiles/ChimericGenomeMaker.dir/src/main/main.cpp.o
Linking CXX executable ChimericGenomeMaker
[ 80%] Built target ChimericGenomeMaker
Scanning dependencies of target calculMean
[100%] Building CXX object CMakeFiles/calculMean.dir/src/shared/calc_mean.cpp.o
Linking CXX shared library libcalculMean.dylib
Post-build is Running
POST-BUILD SCRIPT
HELLO YOU!
[100%] Built target calculMean
[ 20%] Built target calculSum
[ 80%] Built target ChimericGenomeMaker
[100%] Built target calculMean
Install the project...
-- Install configuration: ""
-- Installing: /Users/JP/Desktop/ChimericGenomeMaker/build/install/lib/shared/libcalculMean.dylib
-- Installing: /Users/JP/Desktop/ChimericGenomeMaker/build/install/lib/static/libcalculSum.a
-- Installing: /Users/JP/Desktop/ChimericGenomeMaker/build/install/bin/ChimericGenomeMaker
m1-p19-gen:ChimericGenomeMaker JP$ 

1 个答案:

答案 0 :(得分:0)

最后我成功了。 现在,如果我从我的共享目录中移动我的动态库:我的可执行文件将不再起作用。这是通常可以预期的行为。

我不需要将所有源文件合并到一个可执行文件中。 (这是第一个解决方案,它有效,但我认为它不干净)

  

ADD_EXECUTABLE(ChimericGenomeMaker" $ {SOURCES_SHARED}"   #&34; $ {SOURCES_MAIN}"" $ {SOURCES_STATIC}" )

我只将主要源添加到我的可执行文件中并链接目标库:

  

ADD_EXECUTABLE(ChimericGenomeMaker" $ {SOURCES_MAIN}")
     TARGET_LINK_LIBRARIES(ChimericGenomeMaker calculMean)
     TARGET_LINK_LIBRARIES(ChimericGenomeMaker calculSum)

我玩@rpath @executable_path:

  

设置(CMAKE_INSTALL_NAME_DIR" @ rpath")

     

组(CMAKE_INSTALL_RPATH   " @executable_path /..$ {CMAKE_INSTALL_PREFIX} / LIB /共享&#34)

我的新CmakeLists.txt现在可以在mac OSX下运行:

#cmake -G "Eclipse CDT4 - Unix Makefiles" ..
#SET (CMAKE_CXX_COMPILER "/usr/bin/g++")
#Alternatively, you could configure a script for executing the program which then dynamically adjusts PATH (Windows), 
#LD_LIBRARY_PATH (Linux) or DYLD_LIBRARY_PATH (Mac) before executing your binary. 
#These environment variables are used to resolve shared libraries at runtime

IF (${APPLE})
    MESSAGE(STATUS "WELCOME TO APPLE")

    set(CMAKE_MACOSX_RPATH ON)
    set(CMAKE_SKIP_BUILD_RPATH FALSE)
    set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
    set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
    set(CMAKE_INSTALL_NAME_DIR "@rpath")
    set(CMAKE_INSTALL_RPATH "@executable_path/..${CMAKE_INSTALL_PREFIX}/lib/shared")

ENDIF()

CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(ChimericGenomeMaker)

SET (ChimericGenomeMaker_VERSION_MAJOR 1)
SET (ChimericGenomeMaker_VERSION_MINOR 0)

#used by makefile users in order to install software at non-default location
#make DESTDIR=/home/john install --> prepended with the DESTDIR value
SET(CMAKE_INSTALL_PREFIX install)

#SET(CMAKE_SKIP_BUILD_RPATH true )
#Can manually add the sources using the set command as follows:
FILE(GLOB SOURCES_MAIN "src/main/*.cpp")
INCLUDE_DIRECTORIES("${PROJECT_SOURCE_DIR}/include/main")


#Generate the static library from the sources
FILE(GLOB SOURCES_STATIC "src/static/*.cpp")
INCLUDE_DIRECTORIES("${PROJECT_SOURCE_DIR}/include/static")
ADD_LIBRARY(calculSum STATIC "${SOURCES_STATIC}")
INSTALL(TARGETS calculSum DESTINATION "lib/static")

#Generate the shared library from the sources
FILE(GLOB SOURCES_SHARED "src/shared/*.cpp")
INCLUDE_DIRECTORIES("${PROJECT_SOURCE_DIR}/include/shared")
ADD_LIBRARY(calculMean SHARED "${SOURCES_SHARED}")
#MACOSX_RPATH is now specified for the following targets calcuMean
#SET_TARGET_PROPERTIES(calculMean PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib/shared")
INSTALL(TARGETS calculMean DESTINATION "lib/shared")
#MACOSX_RPATH is not specified for the following targets calcuMean

#Build a stand alone program
ADD_EXECUTABLE(ChimericGenomeMaker "${SOURCES_MAIN}")# "${SOURCES_STATIC}" "${SOURCES_SHARED}"

TARGET_LINK_LIBRARIES(ChimericGenomeMaker calculMean) 
TARGET_LINK_LIBRARIES(ChimericGenomeMaker calculSum)

INSTALL(TARGETS ChimericGenomeMaker DESTINATION bin)

ADD_CUSTOM_COMMAND(TARGET calculMean
                   POST_BUILD
                   COMMAND "${CMAKE_SOURCE_DIR}/bash/post-build.sh" "HELLO YOU!"
                   WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
                   COMMENT "Post-build is Running" VERBATIM
)


# If you want to share your lib and give description of the methods you need to make install & export header
#INSTALL(FILES "${PROJECT_SOURCE_DIR}/include/static/calc_sum.h" DESTINATION include)


# ------------------------- Begin Generic CMake Variable Logging ------------------


MESSAGE( STATUS "CMAKE_INSTALL_NAME_DIR:         " ${CMAKE_INSTALL_NAME_DIR} )
MESSAGE( STATUS "CMAKE_INSTALL_RPATH:         " ${CMAKE_INSTALL_RPATH} )

# if you are building in-source, this is the same as CMAKE_SOURCE_DIR, otherwise 
# this is the top level directory of your build tree 
MESSAGE( STATUS "CMAKE_BINARY_DIR:         " ${CMAKE_BINARY_DIR} )

# if you are building in-source, this is the same as CMAKE_CURRENT_SOURCE_DIR, otherwise this 
# is the directory where the compiled or generated files from the current CMakeLists.txt will go to 
MESSAGE( STATUS "CMAKE_CURRENT_BINARY_DIR: " ${CMAKE_CURRENT_BINARY_DIR} )

# this is the directory, from which cmake was started, i.e. the top level source directory 
MESSAGE( STATUS "CMAKE_SOURCE_DIR:         " ${CMAKE_SOURCE_DIR} )

# this is the directory where the currently processed CMakeLists.txt is located in 
MESSAGE( STATUS "CMAKE_CURRENT_SOURCE_DIR: " ${CMAKE_CURRENT_SOURCE_DIR} )

# contains the full path to the top level directory of your build tree 
MESSAGE( STATUS "PROJECT_BINARY_DIR: " ${PROJECT_BINARY_DIR} )

# contains the full path to the root of your project source directory,
# i.e. to the nearest directory where CMakeLists.txt contains the PROJECT() command 
MESSAGE( STATUS "PROJECT_SOURCE_DIR: " ${PROJECT_SOURCE_DIR} )

# set this variable to specify a common place where CMake should put all executable files
# (instead of CMAKE_CURRENT_BINARY_DIR)
MESSAGE( STATUS "EXECUTABLE_OUTPUT_PATH: " ${EXECUTABLE_OUTPUT_PATH} )

# set this variable to specify a common place where CMake should put all libraries 
# (instead of CMAKE_CURRENT_BINARY_DIR)
MESSAGE( STATUS "LIBRARY_OUTPUT_PATH:     " ${LIBRARY_OUTPUT_PATH} )

# tell CMake to search first in directories listed in CMAKE_MODULE_PATH
# when you use FIND_PACKAGE() or INCLUDE()
MESSAGE( STATUS "CMAKE_MODULE_PATH: " ${CMAKE_MODULE_PATH} )

# this is the complete path of the cmake which runs currently (e.g. /usr/local/bin/cmake) 
MESSAGE( STATUS "CMAKE_COMMAND: " ${CMAKE_COMMAND} )

# this is the CMake installation directory 
MESSAGE( STATUS "CMAKE_ROOT: " ${CMAKE_ROOT} )

# this is the filename including the complete path of the file where this variable is used. 
MESSAGE( STATUS "CMAKE_CURRENT_LIST_FILE: " ${CMAKE_CURRENT_LIST_FILE} )

# this is linenumber where the variable is used
MESSAGE( STATUS "CMAKE_CURRENT_LIST_LINE: " ${CMAKE_CURRENT_LIST_LINE} )

# this is used when searching for include files e.g. using the FIND_PATH() command.
MESSAGE( STATUS "CMAKE_INCLUDE_PATH: " ${CMAKE_INCLUDE_PATH} )

# this is used when searching for libraries e.g. using the FIND_LIBRARY() command.
MESSAGE( STATUS "CMAKE_LIBRARY_PATH: " ${CMAKE_LIBRARY_PATH} )

# the complete system name, e.g. "Linux-2.4.22", "FreeBSD-5.4-RELEASE" or "Windows 5.1" 
MESSAGE( STATUS "CMAKE_SYSTEM: " ${CMAKE_SYSTEM} )

# the short system name, e.g. "Linux", "FreeBSD" or "Windows"
MESSAGE( STATUS "CMAKE_SYSTEM_NAME: " ${CMAKE_SYSTEM_NAME} )

# only the version part of CMAKE_SYSTEM 
MESSAGE( STATUS "CMAKE_SYSTEM_VERSION: " ${CMAKE_SYSTEM_VERSION} )

# the processor name (e.g. "Intel(R) Pentium(R) M processor 2.00GHz") 
MESSAGE( STATUS "CMAKE_SYSTEM_PROCESSOR: " ${CMAKE_SYSTEM_PROCESSOR} )

# is TRUE on all UNIX-like OS's, including Apple OS X and CygWin
MESSAGE( STATUS "UNIX: " ${UNIX} )

# is TRUE on Windows, including CygWin 
MESSAGE( STATUS "WIN32: " ${WIN32} )

# is TRUE on Apple OS X
MESSAGE( STATUS "APPLE: " ${APPLE} )

# is TRUE when using the MinGW compiler in Windows
MESSAGE( STATUS "MINGW: " ${MINGW} )

# is TRUE on Windows when using the CygWin version of cmake
MESSAGE( STATUS "CYGWIN: " ${CYGWIN} )

# is TRUE on Windows when using a Borland compiler 
MESSAGE( STATUS "BORLAND: " ${BORLAND} )

# Microsoft compiler 
MESSAGE( STATUS "MSVC: " ${MSVC} )
MESSAGE( STATUS "MSVC_IDE: " ${MSVC_IDE} )
MESSAGE( STATUS "MSVC60: " ${MSVC60} )
MESSAGE( STATUS "MSVC70: " ${MSVC70} )
MESSAGE( STATUS "MSVC71: " ${MSVC71} )
MESSAGE( STATUS "MSVC80: " ${MSVC80} )
MESSAGE( STATUS "CMAKE_COMPILER_2005: " ${CMAKE_COMPILER_2005} )

# set this to true if you don't want to rebuild the object files if the rules have changed, 
# but not the actual source files or headers (e.g. if you changed the some compiler switches) 
MESSAGE( STATUS "CMAKE_SKIP_RULE_DEPENDENCY: " ${CMAKE_SKIP_RULE_DEPENDENCY} )

# since CMake 2.1 the install rule depends on all, i.e. everything will be built before installing. 
# If you don't like this, set this one to true.
MESSAGE( STATUS "CMAKE_SKIP_INSTALL_ALL_DEPENDENCY: " ${CMAKE_SKIP_INSTALL_ALL_DEPENDENCY} )

# If set, runtime paths are not added when using shared libraries. Default it is set to OFF
MESSAGE( STATUS "CMAKE_SKIP_RPATH: " ${CMAKE_SKIP_RPATH} )

# set this to true if you are using makefiles and want to see the full compile and link 
# commands instead of only the shortened ones 
MESSAGE( STATUS "CMAKE_VERBOSE_MAKEFILE: " ${CMAKE_VERBOSE_MAKEFILE} )

# this will cause CMake to not put in the rules that re-run CMake. This might be useful if 
# you want to use the generated build files on another machine. 
MESSAGE( STATUS "CMAKE_SUPPRESS_REGENERATION: " ${CMAKE_SUPPRESS_REGENERATION} )

# A simple way to get switches to the compiler is to use ADD_DEFINITIONS(). 
# But there are also two variables exactly for this purpose: 

# the compiler flags for compiling C sources 
MESSAGE( STATUS "CMAKE_C_FLAGS: " ${CMAKE_C_FLAGS} )

# the compiler flags for compiling C++ sources 
MESSAGE( STATUS "CMAKE_CXX_FLAGS: " ${CMAKE_CXX_FLAGS} )

# Choose the type of build.  Example: SET(CMAKE_BUILD_TYPE Debug) 
MESSAGE( STATUS "CMAKE_BUILD_TYPE: " ${CMAKE_BUILD_TYPE} )

# if this is set to ON, then all libraries are built as shared libraries by default.
MESSAGE( STATUS "BUILD_SHARED_LIBS: " ${BUILD_SHARED_LIBS} )

# the compiler used for C files 
MESSAGE( STATUS "CMAKE_C_COMPILER: " ${CMAKE_C_COMPILER} )

# the compiler used for C++ files 
MESSAGE( STATUS "CMAKE_CXX_COMPILER: " ${CMAKE_CXX_COMPILER} )

# if the compiler is a variant of gcc, this should be set to 1 
MESSAGE( STATUS "CMAKE_COMPILER_IS_GNUCC: " ${CMAKE_COMPILER_IS_GNUCC} )

# if the compiler is a variant of g++, this should be set to 1 
MESSAGE( STATUS "CMAKE_COMPILER_IS_GNUCXX : " ${CMAKE_COMPILER_IS_GNUCXX} )

# the tools for creating libraries 
MESSAGE( STATUS "CMAKE_AR: " ${CMAKE_AR} )
MESSAGE( STATUS "CMAKE_RANLIB: " ${CMAKE_RANLIB} )

# ENVIRONNEMENT VARIABLE 
MESSAGE(STATUS "PATH : $ENV{PATH}")


# ------------------------- End of Generic CMake Variable Logging ------------------