Commit b25c93d8 authored by Steven Murray's avatar Steven Murray
Browse files

Move enabling and finding of OCCI support to top CMakeLists.txt file

parent e9c265f5
......@@ -109,6 +109,21 @@ ELSE(DEFINED PackageOnly)
include_directories(${PROJECT_SOURCE_DIR})
include_directories(${CMAKE_BINARY_DIR})
# OCCI support is on by default
set (OCCI_SUPPORT ON)
# Switch OCCI support off if using gcc 5.1 or higher
if (CMAKE_COMPILER_IS_GNUCC)
if (GCC_VERSION VERSION_GREATER 5.0)
message (STATUS "Detected gcc >= 5.1 - Switching off OCCI support")
set (OCCI_SUPPORT OFF)
endif (GCC_VERSION VERSION_GREATER 5.0)
endif (CMAKE_COMPILER_IS_GNUCC)
if (OCCI_SUPPORT)
find_package (oracle-instantclient REQUIRED)
endif (OCCI_SUPPORT)
if(BUILD_CMDLINE_ONLY)
message(STATUS "Build cmdline only")
add_subdirectory(cmdline)
......
......@@ -15,21 +15,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
cmake_minimum_required (VERSION 2.6)
# OCCI support is on by default
set (OCCI_SUPPORT ON)
# Switch OCCI support off if using gcc 5.1 or higher
if (CMAKE_COMPILER_IS_GNUCC)
if (GCC_VERSION VERSION_GREATER 5.0)
message(STATUS "Detected gcc >= 5.1 - Switching off OCCI support")
set (OCCI_SUPPORT OFF)
endif (GCC_VERSION VERSION_GREATER 5.0)
endif (CMAKE_COMPILER_IS_GNUCC)
if(OCCI_SUPPORT)
find_package (oracle-instantclient REQUIRED)
if (OCCI_SUPPORT)
include_directories (${ORACLE-INSTANTCLIENT_INCLUDE_DIRS})
endif(OCCI_SUPPORT)
endif (OCCI_SUPPORT)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshadow")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment