diff --git a/CMakeLists.txt b/CMakeLists.txt index 6cfa5281..3409196d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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") diff --git a/README.md b/README.md index 869ef636..e4564c26 100644 --- a/README.md +++ b/README.md @@ -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 ..