mirror of
https://github.com/CNugteren/CLBlast.git
synced 2024-07-07 12:23:46 +02:00
Fixes for Visual Studio
This commit is contained in:
parent
9bccc2544a
commit
748df9bf75
|
@ -53,14 +53,14 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL Intel)
|
|||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14.0)
|
||||
message(FATAL_ERROR "ICC version must be at least 14.0")
|
||||
endif()
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL MSVC)
|
||||
elseif(MSVC)
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0)
|
||||
message(FATAL_ERROR "MS Visual Studio version must be at least 18.0")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# C++ compiler settings
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL MSVC)
|
||||
if(MSVC)
|
||||
set(FLAGS "/Ox")
|
||||
set(FLAGS "${FLAGS} /wd4715")
|
||||
else()
|
||||
|
@ -80,7 +80,7 @@ endif()
|
|||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLAGS}")
|
||||
|
||||
# C compiler settings (for the sample)
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL MSVC)
|
||||
if(MSVC)
|
||||
set(CFLAGS "/Ox")
|
||||
else()
|
||||
set(CFLAGS "-O3 -std=c99")
|
||||
|
|
|
@ -60,7 +60,7 @@ Furthermore, to build the (optional) correctness and performance tests, another
|
|||
- BLIS
|
||||
- Accelerate
|
||||
|
||||
An example of an out-of-source build (starting from the root of the CLBlast folder):
|
||||
An example of an out-of-source build using a command-line compiler and make (starting from the root of the CLBlast folder):
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
|
@ -68,6 +68,12 @@ An example of an out-of-source build (starting from the root of the CLBlast fold
|
|||
make
|
||||
sudo make install
|
||||
|
||||
When using Visual Studio, the project-files can be generated as follows:
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "Visual Studio 14 Win64" ..
|
||||
|
||||
A custom installation folder can be specified when calling CMake:
|
||||
|
||||
cmake -DCMAKE_INSTALL_PREFIX=/path/to/install/directory ..
|
||||
|
|
Loading…
Reference in a new issue