Skip to content

Commit 696dca2

Browse files
committed
Window specific changes
1 parent 3aafc0e commit 696dca2

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

source/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
project(modern.cpp.core)
3232

3333
if(UNIX)
34-
set(${PROJECT_NAME}_os_src unixservice/main.cpp)
34+
set(${PROJECT_NAME}_os_src Serial.cpp Serial.h unixservice/main.cpp)
3535
endif()
3636

3737
add_library(${PROJECT_NAME}
@@ -44,8 +44,6 @@ add_library(${PROJECT_NAME}
4444
Exec.h
4545
KeyState.cpp
4646
KeyState.h
47-
Serial.cpp
48-
Serial.h
4947
StringExtras.cpp
5048
StringExtras.h
5149
Timing.cpp

source/Exec.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,12 @@ namespace vx {
5151
#else
5252
m_resultCode = pclose( _file );
5353
#endif
54+
#ifndef _WIN32
5455
if ( WIFEXITED( m_resultCode ) ) {
5556

5657
m_resultCode = WEXITSTATUS( m_resultCode );
5758
}
59+
#endif
5860
}
5961

6062
int result() { return m_resultCode; }

source/Timing.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@
3838
namespace vx {
3939

4040
/** Multiplier from nanoseconds to milliseconds to seconds and vice versa. */
41+
#ifdef _WIN32
42+
constexpr double multiplier = 1000.0;
43+
#else
4144
constexpr long long multiplier = 1000.0;
45+
#endif
4246

4347
void Timing::start() {
4448

0 commit comments

Comments
 (0)