Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(NOT WIN32 AND NOT WIN64)
- ########################################
- ## require and enable C++0x/11/14
- ########################################
- include(CheckCXXCompilerFlag)
- CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX14)
- CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
- CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
- if(COMPILER_SUPPORTS_CXX14)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
- message("-- Nanodbc compiler flag -std=c++14")
- elseif(COMPILER_SUPPORTS_CXX11)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
- message("-- Nanodbc compiler flag -std=c++11")
- elseif(COMPILER_SUPPORTS_CXX0X)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
- message("-- Nanodbc compiler flag -std=c++0x9")
- else()
- message(WARNING "-- Nanodbc compiler ${CMAKE_CXX_COMPILER} has no C++ 0x/11/14 support.")
- endif()
- ########################################
- ## find unixODBC or iODBC config binary
- ########################################
- find_program(ODBC_CONFIG odbc_config $ENV{ODBC_PATH}/bin /usr/bin /usr/local/bin PATHS)
- if(NOT ODBC_CONFIG)
- find_program(ODBC_CONFIG iodbc-config $ENV{ODBC_PATH}/bin /usr/bin /usr/local/bin PATHS)
- endif()
- if(NOT ODBC_CONFIG)
- message(FATAL_ERROR "can not find odbc config program")
- else()
- message("-- ODBC found")
- endif()
- endif()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement