Skip to content

Commit

Permalink
Object files should depend on spirv.h and friends
Browse files Browse the repository at this point in the history
Don't use SYSTEM attribute on include_directories directive
for the SPIR-V standard header files.  When you do, object files
are not considered dependent on those headers.

Checked by looking at the dependency file source/disassemble.cpp.o.d,
and by trying to compile after a trivial edit to spirv.h

Fixes #7

Also, use "" inclusion instead of <> inclusion for standard SPIR-V
headers.
  • Loading branch information
dneto0 committed Nov 17, 2015
1 parent aa50c45 commit 748d585
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ if(UNIX)
endif()
endif()

include_directories(SYSTEM
${CMAKE_CURRENT_SOURCE_DIR}/external/include)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/external/include)

include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/include)
Expand Down
6 changes: 3 additions & 3 deletions include/libspirv/libspirv.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
#ifndef LIBSPIRV_LIBSPIRV_LIBSPIRV_H_
#define LIBSPIRV_LIBSPIRV_LIBSPIRV_H_

#include <headers/GLSL.std.450.h>
#include <headers/OpenCL.std.h>
#include <headers/spirv.h>
#include "headers/GLSL.std.450.h"
#include "headers/OpenCL.std.h"
#include "headers/spirv.h"

#ifdef __cplusplus
extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion source/instruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <cstdint>
#include <vector>

#include <headers/spirv.h>
#include "headers/spirv.h"

#include "table.h"

Expand Down

0 comments on commit 748d585

Please sign in to comment.