Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msvc build #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)

project(simdcsv)

Expand All @@ -13,12 +12,20 @@ set(CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/bin)
include_directories("${PROJECT_SOURCE_DIR}/src")
#include_directories("${PROJECT_SOURCE_DIR}/thirdparty")

file(GLOB SOURCES "${PROJECT_SOURCE_DIR}/src/*.cpp")
file(GLOB SOURCES "src/*.cpp")

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_CXX_FLAGS "-std=c++17 -march=native -Wall -Wextra")

if (NOT MSVC)
add_compile_options(-march=native -Wall -Wextra)
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
set(CMAKE_CXX_FLAGS_DEBUG "-DDEBUG -O0 -g")
else()
add_compile_options(-arch:AVX2)
endif()

# evidently useful:
macro(append var string)
Expand Down
8 changes: 4 additions & 4 deletions src/common_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@
#ifdef _MSC_VER


#define really_inline inline
#define never_inline __declspec(noinline)
#define really_inline //let the compiler decide
#define never_inline //let the compiler decide

#define UNUSED
#define WARN_UNUSED

#ifndef likely
#define likely(x) x
#define likely(x) x [[likely]]
#endif
#ifndef unlikely
#define unlikely(x) x
#define unlikely(x) x [[unlikely]]
#endif

#else
Expand Down
Loading